<?php
App::uses('AppModel', 'Model');
class Vehiculo extends AppModel{
	
    public $useTable = 'Vehiculos';
    public $primaryKey = 'idVehiculo';
    
    public $belongsTo = array(
        'Cliente' => array(
            'className' => 'Cliente',
            'foreignKey' => 'idCliente'
        ),
        'MarcaVehiculo' => array(
            'className' => 'CatalogoDetalle',
            'foreignKey' => false,
        	'conditions' => array('Vehiculo.idMarcaCatalogo = MarcaVehiculo.idCatalogo and Vehiculo.idMarcaItem = MarcaVehiculo.idItem')
        ),
        'Combustible' => array(
            'className' => 'CatalogoDetalle',
            'foreignKey' => false,
        	'conditions' => array('Vehiculo.idCombustibleCatalogo = Combustible.idCatalogo and Vehiculo.idCombustibleItem = Combustible.idItem')
        )
    );
}
?>
